<?php
namespace Home\Model;
use Think\Model;

class UserModel extends Model{
	public function checkNamePwd($ckname,$ckpassword){
        
        $user = M("user");
        $where['username'] = $ckname;
        $data = $user->where($where)->select();
        
        if( !empty($data) ){
            if( $ckpassword == $data[0]['password']){
                return $data;
            } else {
                return false;   
            }
        } else{
            return false;
        }
    }
}